/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.server.modules.sys.entity.schedule;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.server.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 日程Entity
 * @author 丁光彪
 * @version 2016-12-23
 */
public class Schedule extends DataEntity<Schedule> {
	
	private static final long serialVersionUID = 1L;
	protected ScheduleUser scheduleUser;
	protected String type;		// 日程类型：任务，其他...
	protected String name;		// 日程名称
	protected String place;		// 地点
	protected Date startTime;		// 日程开始时间
	protected Date endTime;		// 日程结束时间
	protected String description;		// 说明
	protected Boolean isReminder;		// 是否需要提醒
	protected String reminderType;		// 提醒类型
	protected Boolean isImportant;		// 是否为重要日程安排
	protected Boolean isRepeat;		// 是否重复
	protected String repeatType;		// 重复类型
	protected Date repeatEndTime;		// 重复结束时间
	protected Boolean isRepeatForever;		// 是否重复永不结束
	protected Long intervalNum;		// 重复间隔
	protected Boolean isAllDay;		// 是否为全天

	protected String startTimeStr;
	protected String endTimeStr;
	protected String repeatEndTimeStr;
	protected String startDateStr;
	protected String endDateStr;
	private  Date OldEndDate;
	private  Date OldStartDate;
	private String intervalNumStr;

	public ScheduleUser getScheduleUser() {
		return scheduleUser;
	}

	public void setScheduleUser(ScheduleUser scheduleUser) {
		this.scheduleUser = scheduleUser;
	}

	public String getIntervalNumStr() {
		return intervalNumStr;
	}

	public void setIntervalNumStr(String intervalNumStr) {
		this.intervalNumStr = intervalNumStr;
	}

	public Boolean getReminder() {
		return isReminder;
	}

	public void setReminder(Boolean reminder) {
		isReminder = reminder;
	}

	public Boolean getImportant() {
		return isImportant;
	}

	public void setImportant(Boolean important) {
		isImportant = important;
	}

	public Boolean getRepeat() {
		return isRepeat;
	}

	public void setRepeat(Boolean repeat) {
		isRepeat = repeat;
	}

	public Boolean getRepeatForever() {
		return isRepeatForever;
	}

	public void setRepeatForever(Boolean repeatForever) {
		isRepeatForever = repeatForever;
	}

	public Boolean getAllDay() {
		return isAllDay;
	}

	public void setAllDay(Boolean allDay) {
		isAllDay = allDay;
	}

	public Date getOldEndDate() {
		return OldEndDate;
	}

	public void setOldEndDate(Date oldEndDate) {
		OldEndDate = oldEndDate;
	}

	public Date getOldStartDate() {
		return OldStartDate;
	}

	public void setOldStartDate(Date oldStartDate) {
		OldStartDate = oldStartDate;
	}

	public String getStartDateStr() {
		return startDateStr;
	}

	public void setStartDateStr(String startDateStr) {
		this.startDateStr = startDateStr;
	}

	public String getEndDateStr() {
		return endDateStr;
	}

	public void setEndDateStr(String endDateStr) {
		this.endDateStr = endDateStr;
	}

	public String getStartTimeStr() {
		return startTimeStr;
	}

	public void setStartTimeStr(String startTimeStr) {
		this.startTimeStr = startTimeStr;
	}

	public String getEndTimeStr() {
		return endTimeStr;
	}

	public void setEndTimeStr(String endTimeStr) {
		this.endTimeStr = endTimeStr;
	}

	public String getRepeatEndTimeStr() {
		return repeatEndTimeStr;
	}

	public void setRepeatEndTimeStr(String repeatEndTimeStr) {
		this.repeatEndTimeStr = repeatEndTimeStr;
	}

	public Schedule() {
		super();
	}

	public Schedule(String id){
		super(id);
	}


	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=0, max=2048, message="日程名称长度必须介于 0 和 2048 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=1024, message="地点长度必须介于 0 和 1024 之间")
	public String getPlace() {
		return place;
	}

	public void setPlace(String place) {
		this.place = place;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	@Length(min=0, max=1, message="是否需要提醒长度必须介于 0 和 1 之间")
	public Boolean getIsReminder() {
		return isReminder;
	}

	public void setIsReminder(Boolean isReminder) {
		this.isReminder = isReminder;
	}
	
	@Length(min=0, max=128, message="提醒类型长度必须介于 0 和 128 之间")
	public String getReminderType() {
		return reminderType;
	}

	public void setReminderType(String reminderType) {
		this.reminderType = reminderType;
	}
	
	@Length(min=0, max=1, message="是否为重要日程安排长度必须介于 0 和 1 之间")
	public Boolean getIsImportant() {
		return isImportant;
	}

	public void setIsImportant(Boolean isImportant) {
		this.isImportant = isImportant;
	}
	
	@Length(min=0, max=1, message="是否重复长度必须介于 0 和 1 之间")
	public Boolean getIsRepeat() {
		return isRepeat;
	}

	public void setIsRepeat(Boolean isRepeat) {
		this.isRepeat = isRepeat;
	}
	
	@Length(min=0, max=128, message="重复类型长度必须介于 0 和 128 之间")
	public String getRepeatType() {
		return repeatType;
	}

	public void setRepeatType(String repeatType) {
		this.repeatType = repeatType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getRepeatEndTime() {
		return repeatEndTime;
	}

	public void setRepeatEndTime(Date repeatEndTime) {
		this.repeatEndTime = repeatEndTime;
	}
	
	@Length(min=0, max=1, message="是否重复永不结束长度必须介于 0 和 1 之间")
	public Boolean getIsRepeatForever() {
		return isRepeatForever;
	}

	public void setIsRepeatForever(Boolean isRepeatForever) {
		this.isRepeatForever = isRepeatForever;
	}
	
	public Long getIntervalNum() {
		return intervalNum;
	}

	public void setIntervalNum(Long intervalNum) {
		this.intervalNum = intervalNum;
	}
	
	@Length(min=0, max=1, message="是否为全天长度必须介于 0 和 1 之间")
	public Boolean getIsAllDay() {
		return isAllDay;
	}

	public void setIsAllDay(Boolean isAllDay) {
		this.isAllDay = isAllDay;
	}
	
}